package com.zhanghe.mall.pojo;

import com.zhanghe.mall.pojo.common.BasePojo;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "role_permissions")
public class RolePermissions extends BasePojo {

    @ManyToOne
    @JoinColumn(name = "role_id")
    public Role role;
    @ManyToOne
    @JoinColumn(name = "permissions_id")
    public Permissions permissions;

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Permissions getPermissions() {
        return permissions;
    }

    public void setPermissions(Permissions permissions) {
        this.permissions = permissions;
    }
}
